class Service {
  constructor(ctx, controllerName, serviceName) {
    this.ctx = ctx;
    const traceId = ctx.traceId;
    this.log = new Proxy(ctx.log, {
      get(target, propKey, receiver) {
        return (...args) => {
          Reflect.get(target, propKey, receiver)(`[${ controllerName }] [${ serviceName }] [${ traceId }]`, ...args);
        };
      },
    });
  }
}

exports.Service = Service;